#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
cd `dirname $0`
if [ "$#" == 0 ]; then
 cmake -DCMAKE_BUILD_TYPE=Release .
 make
elif [ "$#" == 1 -a "$1" == "-D" ]; then
 cmake -DCMAKE_BUILD_TYPE=Debug .
 make
elif [ "$#" == 1 -a "$1" == "-R" ]; then
 cmake -DCMAKE_BUILD_TYPE=Release .
 make
elif [ "$#" == 1 -a "$1" == "-C" ]; then
 make clean
else
 echo "invaild parameter!" && exit 0
fi

